<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">

      <button @click="btn1Click()">按钮1</button>
      <button @click="btn2Click">按钮2</button>

      <button @click="btn3Click(132,'abc',true,msg)">btn3</button>
      <button @click="btn4Click(132,'abc',true,msg, $event)">btn4</button>
    </div>

    <script src="../js/vue.js"></script>

    <script>
      const app = Vue.createApp({
        data() {
          return {
            msg: ""
          }
        },
        methods:{
          btn1Click(args){
            console.log(args);
          },
          btn2Click(args){
            console.log(args);
          },
          btn3Click(arg1, arg2, arg3, arg4){
            console.log(arg1, arg2, arg3, arg4);
            console.log(arguments);
          },
          btn4Click(arg1, arg2, arg3,arg4,event){
            console.log(arg1, arg2, arg3, arg4, event);
            console.log(arguments);
          }
        }
      }).mount("#app");
    </script>
  </body>
</html>